#ifndef WXSVERSIONCONVERTER_H
#define WXSVERSIONCONVERTER_H

#include <tinyxml.h>
#include <wx/string.h>

class wxsProject;

class wxsVersionConverter {
  public:
    bool DetectOldConfig( TiXmlElement* ConfigNode, wxsProject* Project ) const;
    TiXmlElement* ConvertFromOldConfig( TiXmlElement* ConfigNode, TiXmlDocument* Doc, wxsProject* Project ) const;
    TiXmlElement* Convert( TiXmlElement* ConfigNode, TiXmlDocument* Doc, wxsProject* Project ) const;
    static const wxsVersionConverter& Get();
  private:
    void ConvertOldWxsFile( const wxString& FileName, bool UsingXRC ) const;
    void GatherExtraFromOldResourceReq( TiXmlElement* Object, TiXmlElement* Extra, bool RootNode ) const;
    void AdoptOldSourceFile( const wxString& FileName, const wxString& ClassName ) const;
    bool LineContainDirectivesOnly( const wxString& Code, int& BeginPos ) const;
    wxsVersionConverter() {}
    ~wxsVersionConverter() {}
};

#endif
